﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Domain.Entities.Auditing;
using FwProject.ShoppingMall.Commodity;

namespace FwProject.Commodity.Dto
{
    /// <summary>
    /// 商品评论
    /// </summary>
    [AutoMap(typeof(CommodityReviews))]
    public class CommodityReviewsDto: EntityDto<Guid>, ICreationAudited
    {
        /// <summary>
        /// 商品编号
        /// </summary>
        [Display(Name = "商品编号")]
        public Guid Productid { get; set; }

        /// <summary>
        /// 评论人编号
        /// </summary>
        [Display(Name = "评论人编号")]
        public long Reviewsid { get; set; }
        /// <summary>
        /// 评论人用户名
        /// </summary>
        [Display(Name = "评论人用户名")]
        public string ReviceName { get; set; }
        /// <summary>
        /// 评论内容
        /// </summary>
        [Display(Name = "评论内容")]
        public string RevicwsContent { get; set; }
        /// <summary>
        /// 描述相符评分0-5
        /// </summary>
        [Display(Name = "评分")]
        public int CommentScore { get; set; }

        /// <summary>
        /// 服务评分0-5
        /// </summary>
        [Required]
        public int ServiceCommentScore { get; set; }
        /// <summary>
        /// 是否显示
        /// </summary>
        [Display(Name = "是否显示")]
        public bool IsShow { get; set; } = true;

        /// <summary>
        /// 评价订单编号
        /// </summary>
        [Display(Name = "评价的订单编号")]
        public Guid OrderId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public long? CreatorUserId { get; set; }
        /// <summary>
        /// 评论时间
        /// </summary>
        [Display(Name ="评论时间")]
        public DateTime CreationTime { get; set; }
    }
    /// <summary>
    /// 商品评论dto
    /// </summary>
    public class CommodityReviewsOutputDto:EntityDto<Guid>
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 评论人
        /// </summary>
        public string ReviceName { get; set; }

        /// <summary>
        /// 评论日期
        /// </summary>
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 评分
        /// </summary>
        public int CommentScore { get; set; }

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool IsShow { get; set; }
    }


}
